// JavaScript Document
function show_profile(){
	$.post("profile/student_profile.php",function(data){
								   $('#entire').html(data);
								   });
}
function load_ques(quiz_id)
{
	$.post("quiz/load_question.php",{id:quiz_id},function(data){
								   $('#InnerDarkbox').html(data);
								   });
}
function show_awards()
{
	$.post("report/showawards.php",function(data){
								   $('#entire').html(data);
								   });

}
function point_request()
{
	$.post("pt_request/pt_request.php",function(data){
								   $('#entire').html(data);
								   });
}
function stu_pt_overview(){
	$.post("report/st_pt_report.php",function(data){
								   $('#entire').html(data);
								   });
}
function update_pt_request()
{
	if(checkptRQ()==false) return false;
	var sp1="";
	var sp2="";
	var sp3="";
	var da="";
	if($('#select_mode').val()==11||$('#select_mode').val()==12)
	{
		sp1=$('#test').val();
		sp2=$('#percentage').val();
	}
	else
	{
		sp1=$('#college').val();
		sp2=$('#competition').val();
		sp3=$('#prize_level').val();
		da=$('#date').val()
	}
	$.post("pt_request/update_pt_request.php",{type:$('#select_mode').val(),special1:sp1,special2:sp2,special3:sp3,date:da},function(){
			point_request();																													 			$('#notice').html('Request sent Successfully').show().fadeOut(6000);
	   		});
}
function showStudentInbox()
{
	$.post("inbox/show_inbox_student.php",function(data){
							$('#entire').html(data);
										});
}
function checkptRQ()
{
	$('#pt_req_status').hide();
	if($('#select_mode').val()==11||$('#select_mode').val()==12)
	{
		if($('#percentage').val()=="")
		{
			$('#pt_req_status').html('Percentage Required').show(400);
			return false;
		}
	}
	else
	{
		if($('#college').val()=="")
		{
			$('#pt_req_status').html('Event Name Required').show(400);
			return false;
		}
		else if($('#competition').val()=="")
		{
			$('#pt_req_status').html('Competition Name Required').show(400);
			return false;
		}
		else if($('#date').val()=="")
		{
			$('#pt_req_status').html('Date Required').show(400);
			return false;
		}
	}
	return true;
}
function requestClose(id)
{
	$.post("inbox/request_close.php",{req_id:id},function(){
			$('#notice').html('Request Closed Successfully').show().fadeOut(6000);
	});
}
function quizClose(id)
{
		$.post("inbox/quiz_close.php",{ques_id:id},function(){
			$('#notice').html('Quiz Closed Successfully').show().fadeOut(6000);
	});s
}